package lab01;

import org.omg.CORBA.SetOverrideType;

public class Test05 {
    public static void main(String[] args) {
        int n=100;
        int sum=0;
        //for语句
        for(int i=1;i<=n;i++){
            sum+=i;
        }
        System.out.println(sum);
        //while语句
         int i=0;
        sum=0;
        while(i<=n){
            sum+=i++;
    }
        System.out.println(sum);
        //do whlie语句
        i=0;
        sum=1;
        do{
            sum+=i++;
        }while(i<=1);
        System.out.println(sum);
    }

    }
